﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CinemaProject;

namespace CinemaProject
{
    class SeatCtrl : WcfServiceLibrary1.Ctrl.ISeatCtrl
    {
        private SeatDB seatDB;

        public SeatCtrl()
        {
            seatDB = new SeatDB();
        }

        public Seat getSeatById(string id)
        {
            return seatDB.getSeatById(Convert.ToInt32(id));
        }

        public List<Seat> getSeats()
        {
            return seatDB.getSeats();
        }

        public void insertSeat(Seat seat)
        {
            seatDB.insertSeat(seat);
        }

        public void removeSeat(string id)
        {
            seatDB.removeSeat(Convert.ToInt32(id));
        }

        public void updateSeat(Seat seat)
        {
            seatDB.updateSeat(seat);
        }
    }
}
